package org.alis.smallcc.designpatterns.behavior.state;

import org.alis.smallcc.designpatterns.behavior.memento.Originator;
import org.apache.commons.lang3.StringUtils;

public class PlayState implements State{

	@Override
	public String currentState() {
		return "播放状态";
	}

	@Override
	public boolean canChanage(Originator context) {
		if(StringUtils.equals("停止状态",context.getState())||StringUtils.equals("暂停状态", context.getState())) {

			return true;
		}
		System.out.println("已经在播放状态不能在播放了");
		return false;
	}

}
